


let Action = require('./action');

class RepeactForever extends Action{
    constructor(action){
        super();
        this._innerAction = action;
    }

    isDone() {
        return false;
    }

    start() {
        super.start();
        this._innerAction.target = this.target;
        this._innerAction.start();
    }

    step(dt) {
        this._innerAction.step(dt);
        if(this._innerAction.isDone()){
            this._innerAction.start();
        }
    }
}

module.exports = RepeactForever;
